@import "~antd/lib/style/themes/default.less";
@import "./colorful";
// 反色效果
.ux-invert {
    color: white !important;

    &:hover {
        color: @primary-color;
    }
}

// 基础隐藏效果
.ux-hidden {
    display: none;
}


.ux-unselect {
    > .ant-tree-node-content-wrapper {

        &:hover {
            background-color: white !important;
        }

        .ant-tree-title {
            &:hover {
                background-color: white !important;
                cursor: not-allowed;
            }
        }
    }
}

// 基础标题效果
.ux-title {
    width: 100%;
    min-height: 36px;
    line-height: 36px;
    font-size: 16px;
    color: white;
    margin-bottom: 3px;

    &-pure {
        padding-left: 6px;
        background: -moz-linear-gradient(left, @theme-main 0%, white 100%);
        background: -webkit-linear-gradient(left, @theme-main 0%, white 100%);
        background: -o-linear-gradient(left, @theme-main 0%, white 100%);
        background: -ms-linear-gradient(left, @theme-main 0%, white 100%);
        background: linear-gradient(to right, @theme-main 0%, white 100%);
    }
}

.ux-subject {
    width: 100%;
    min-height: 38px;
    line-height: 38px;
    font-size: 16px;
    margin-bottom: 6px;
    padding-left: 6px;
    background: -moz-linear-gradient(right, @theme-main 0%, white 40%);
    background: -webkit-linear-gradient(right, @theme-main 0%, white 40%);
    background: -o-linear-gradient(right, @theme-main 0%, white 40%);
    background: -ms-linear-gradient(right, @theme-main 0%, white 40%);
    background: linear-gradient(to left, @theme-main 0%, white 40%);

    img {
        position: absolute;
        float: left;
        width: 52px;
        height: 52px;
    }

    .ux-subject-tip {
        float: left;
        margin-top: 6px;
        margin-left: 64px;
        padding-left: 16px;
        line-height: 36px;
        border-left: 8px solid @theme-main;
        border-bottom: 1px solid @theme-main;
        color: black;
        font-size: 15px;
        width: 45%;

        .ux-subject-sub {
            display: inline-block;
            color: #c8c8c8;
            font-size: 12px;
        }
    }
}

.ux-comment {
    .ant-alert {
        margin-bottom: 3px;
    }
}

.ux-tips {
    line-height: 32px;
}

.ux-readonly {
    input[readonly] {
        background-color: white;

        &:hover {
            cursor: pointer;
        }
    }

    input[disabled] {
        background-color: @color-readonly;

        &:hover {
            cursor: not-allowed;
        }
    }

    i:hover {
        cursor: pointer;
    }
}

.ux-left {
    &-text {
        text-align: left;
    }
}

.ux-right {
    &-text {
        text-align: right;
    }

    &-cell {
        text-align: right;
        padding-right: 32px !important;
    }
}

.ux-error {
    width: 98%;
    height: 100%;
    color: red;
    padding: 1%;
    margin: 10px;
    background-color: #fdf2f4;
    border: solid 1px red;
    border-radius: 5px;
    min-height: 200px;
}

.ux-purge {
    i {
        color: red !important;
    }

    .ant-modal-confirm-content {
        color: #cf3533;
    }
}

.ux-error-input {
    position: absolute;
    background-color: @color-error;
    color: white;
    border-radius: 3px;
    border: 1px solid @color-error;
    padding: 2px 5px;
    z-index: 100;
    /** From Animate.css **/
    animation-duration: 1s;
    animation-fill-mode: both;
    animation-name: bounceIn;
}

.ux-y {
    overflow-y: auto;
    overflow-x: hidden;
}

textarea {
    resize: none !important;
}

.ant-tree-node-selected {
    color: white !important;
    background-color: @primary-color !important;
    border-radius: 3px !important;
}

.ux-transfer {
    width: 100%;
    padding-top: 6px;
    padding-bottom: 6px;

    .ant-transfer {

        &-list {
            width: 46%;
        }

        &-operation {
            min-width: 24px;
            width: 24px;
        }
    }

    .left {
        overflow: hidden;
    }

    .right {
        float: right;
    }
}


.ux-view-my {
    line-height: 32px;
    margin-top: 3px;
    margin-bottom: 3px;

    .label {
        text-align: right;
        font-weight: bold;
        padding-right: 6px;
        line-height: 36px;
    }

    .content {
        padding-left: 6px;
    }
}

.ux-link-icon {
    i {
        margin-right: 3px;
    }
}

.ux-ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ux-table {
    .table-content {
        th, td {
            padding: 0 12px !important;
        }

        th {
            border-bottom: dotted 1px @theme-main;
        }
    }

    &-nested {
        border-collapse: collapse !important;
        border: dotted 1px @theme-main;
        .table-content;

        th, td {
            border-left: dotted 1px @theme-main;
            border-right: dotted 1px @theme-main;
        }

        &-pure {
            border-collapse: collapse !important;
            .table-content;
        }
    }
}

.ux-addon {
    &-after {
        .ant-input-group-addon {
            &:hover {
                border-color: @primary-color;
                color: white;
                background-color: @primary-color;
            }
        }
    }

    &-disabled {
        .ant-input-group-addon {
            i {
                color: @disabled-color;
            }

            &:hover {
                cursor: not-allowed;

                i:hover {
                    cursor: not-allowed;
                }
            }
        }
    }
}

.ux-confirm-op {
    .ant-popover-message {
        i {
            font-size: 18px;
            color: #ff3b1a;
        }

        &-title {
            color: #CD2626;
            margin-left: 8px !important;
            line-height: 2.1em !important;
        }
    }
}

// 只读 / 禁用 / 不可编辑专用
.ux {
    // selector
    .ro-selector {
        .ant-input-group {
            input {
                background-color: #Eff0f0;
            }

            .ant-input-group-addon:hover {
                color: #c7c7c7;
                background-color: #FAFAFA;
                cursor: not-allowed;
            }

            .icon-ro {
                color: #c7c7c7;

                &:hover {
                    color: #c7c7c7;
                    background-color: #FAFAFA;
                    cursor: not-allowed;
                }
            }
        }
    }

    // 只读
    &-ro {
        &-textarea {
            background-color: #Eff0f0;
        }


        &-selector {
            &-list {
                .ro-selector;
            }

            &-tree {
                .ro-selector;
            }
        }

        &-file {
            &-upload {
                .ant-upload-list-item-card-actions {
                    display: none;
                }
            }
        }

        &-radio {
            span {
                color: black;
            }
        }
    }

    // 禁用
    &-dis {
        &-textarea {
            background-color: #Eff0f0;
        }

        &-selector {
            &-list {
                .ro-selector;
            }

            &-tree {
                .ro-selector;
            }
        }

        &-file {
            &-upload {
                .ant-upload-list-item-card-actions {
                    display: none;
                }
            }
        }

        &-radio {

        }
    }

    &-bag {
        min-height: 112px;
        padding: 3px;

        &-detail {
            padding: 3px;
        }

        .bag-icon {
            text-align: center;
            padding: 4px;
        }

        .bag-list {
            padding: 2px 12px;
            margin: 0 0 3px 0;
            list-style: none;


            .title {
                color: black;
                font-size: 16px;
                font-weight: bold;
            }

            .abbr {
                font-size: 12px;
                color: #8c8c8c;
            }

            .action {
                text-align: left;

                .inactive:hover {
                    text-decoration: underline;
                }

                .active {
                    color: @button-spec;
                }
            }

            li {
                line-height: 24px;
            }
        }

        .ant-card {

            img {
                display: inline-block;
                width: 64px;
                height: 64px;
            }

            .ant-card-body {
                padding: 6px;
            }

            .ant-card-meta-description {
                font-size: 12px;
                max-height: 18px;
                overflow: hidden;
            }
        }
    }

    &-block {
        text-align: center;
        margin-right: 6px;
        margin-bottom: 6px;
        margin-top: 6px;

        width: 102px;
        height: 116px;
        float: left;

        img {
            width: 64px;
            height: 64px;
        }

        span, a {
            width: 100%;
            line-height: 24px;
            display: inline-block;
        }
    }
}


.ant-calendar {
    &-cell {
        .ant-calendar-date {
            color: #2b2b2b;
        }
    }

    &-disabled-cell {

        .ant-calendar-date {
            color: #c9c9c9;
        }
    }
}

// Extension 部分，位置不可以变更
.ex-input-complex {
    // background-color: #f5f5f5; // #fafafa;
    padding: 8px 5px 12px 0;
    border-right: 3px;
    border-radius: 6px;

    .line(@height) {
        line-height: @height;
        min-height: @height;
    }

    .complex-form {
        padding: 6px 0;

        .ant-col {
            padding-right: 1%;

            .ant-form-item {
                width: 100%;

                .ant-form-item-label {
                    .line(36px)
                }

                .ant-form-item-control {
                    .line(36px)
                }

                .ant-input-password {
                    display: block;
                }
            }
        }
    }
}

.ux-menu {
    &-drop {
        i {
            font-size: 18px !important;
        }

        img {
            width: 24px;
            height: 24px;
            margin-right: 12px;
        }
    }
}